package com.tjyx.maintain.bo;

import java.util.HashMap;

import net.sf.json.JSONObject;

import com.tjyx.common.TJYXException;
import com.tjyx.common.bo.BaseBo;

public class NewsBo extends BaseBo {
	public <T> String getPaginationJSON(int page, int rows, Class<T> clazz,
			String tableName) throws TJYXException {
		sqlMap = new HashMap<String,Object>();
		sqlMap.put("desc", "id"); //默认按照id值倒序查询
		pageMap = initPageMap(page,rows,clazz,tableName,sqlMap);
		JSONObject json = JSONObject.fromObject(pageMap); //将pageMap转换成JSONObject对象
		return json.toString();
	}
}
